package com.example.springboot.mapper;

import com.example.springboot.controller.request.BasePageRequest;
import com.example.springboot.controller.request.LoginRequest;
import com.example.springboot.controller.request.PasswordRequest;
import com.example.springboot.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import sun.security.util.Password;

import java.util.List;

/**
 * ClassName:UserMapper
 * Package:com.example.springboot.mapper
 * Description:
 *
 * @Author: Gao
 * @Create: 2023/2/1 - 16:30
 */
@Mapper
public interface UserMapper {

    List<User> list();

    List<User> listByCondition(BasePageRequest basePageRequest);

    void save(User user);

    User getById(int id);

    void updateById(User user);

    void deleteById(int id);

    int updatePassword(PasswordRequest passwordRequest);

    User getByNameAndPassword(LoginRequest request);

    User getByName(String userName);
}
